<template>
    <view>
        <!--index.wxml-->

        <view class="index">
            <view :class="'header ' + (banertrue ? 'header_lan' : '')" :style="'padding-top: ' + navH + 'px;'">
                <view class="header_height" :style="'height:' + gaodu + 'px;line-height:' + gaodu + 'px;top:' + gaodutops + 'px;'">
                    <view class="index_h_cont3">
                        <view class="index_wenben baise">拼团</view>
                    </view>
                </view>
                <view class="coloe_title">s</view>
            </view>
            <view class="index_banner" style="position: absolute; background: #fff">
                <image src="http://daigou.sllowly.cn/assets/api/images/dzx_img68.png" mode="widthFix"></image>
            </view>

            <view class="index_center" :style="'padding-top:' + (navH + 50) + 'px;'">
                <view class="pintuan_center">
                    <view class="pintuan_item1 xiche_img">
                        <swiper
                            style="height: 240rpx"
                            :indicator-dots="indicatorDots"
                            :vertical="vertical"
                            :autoplay="autoplay"
                            :duration="duration"
                            :interval="interval"
                            :indicator-color="color"
                            :indicator-active-color="colors"
                            :circular="circular"
                        >
                            <swiper-item>
                                <image src="http://daigou.sllowly.cn/assets/api/images/dzx_img69.png" class="slide-image" mode="aspectFill" />
                            </swiper-item>
                            <swiper-item>
                                <image src="http://daigou.sllowly.cn/assets/api/images/dzx_img69.png" class="slide-image" mode="aspectFill" />
                            </swiper-item>
                            <swiper-item>
                                <image src="http://daigou.sllowly.cn/assets/api/images/dzx_img69.png" class="slide-image" mode="aspectFill" />
                            </swiper-item>
                        </swiper>
                    </view>
                    <view class="pintuan_item2">
                        <view class="pintuan_item2_list">
                            <view class="pintuan_item2_cont" @tap="gotiaozhuan" data-url="/pages/pintuans/pintuangc/pintuangc">
                                <image src="http://daigou.sllowly.cn/assets/api/images/dzx_img70.png"></image>
                                <text>拼团广场</text>
                            </view>
                            <view class="pintuan_item2_cont" @tap="gotiaozhuan" data-url="/pages/pintuans/faqipintuan/faqipintuan">
                                <image src="http://daigou.sllowly.cn/assets/api/images/dzx_img71.png"></image>
                                <text>发起拼团</text>
                            </view>
                            <view class="pintuan_item2_cont" @tap="gotiaozhuan" data-url="/pages/pintuans/pintuan_dingdan/pintuan_dingdan">
                                <image src="http://daigou.sllowly.cn/assets/api/images/dzx_img72.png"></image>
                                <text>我的拼团</text>
                            </view>
                            <view class="pintuan_item2_cont" @tap="gotiaozhuan" data-url="/pages/pintuans/liwozuijin/liwozuijin">
                                <image src="http://daigou.sllowly.cn/assets/api/images/dzx_img73.png"></image>
                                <text>离我最近</text>
                            </view>
                        </view>
                    </view>
                    <view class="pintuan_item3">
                        <view class="pintuan_item3_l">
                            <image src="http://daigou.sllowly.cn/assets/api/images/dzx_img74.png"></image>
                            <text>自动定位：新加坡</text>
                        </view>
                        <view class="pintuan_item3_r">
                            <text>切换到其他城市</text>
                            <image src="http://daigou.sllowly.cn/assets/api/images/dzx_img75.png"></image>
                        </view>
                    </view>
                    <view class="pintuan_item6">
                        <image src="http://daigou.sllowly.cn/assets/api/images/dzx_img77.png"></image>
                        <text>暂无拼团订单，去添加一个吧~</text>
                        <view class="pintuan_item6_btns" @tap="qutianjia">去添加</view>
                    </view>
                    <!-- <view class="pintuan_item4">
        <view class="pintuan_item4_title_banner">
          <view class="pintuan_item4_title">
            <image src="../../pages/images/dzx_img47.png"></image>
            <text>离你最近</text>
          </view>
        </view>
        
        <view class="pintuan_item4_list">
          <view class="pintuan_item4_cont">
            <view class="pintuan_item4_top">
              <view class="pintuan_item4_l">
                <image src="../../pages/images/dzx_img27.png"></image>
                <text>新加坡拼团</text>
              </view>
              <view class="pintuan_item4_r">
                <image src="../../pages/images/dzx_img76.png"></image>
                <text>距您442m</text>
              </view>
            </view>
            <view class="pintuan_item4_cent" style="margin-top:24rpx;">
              拼团人数：<text>3人团</text>
            </view>
            <view class="pintuan_item4_cent">
              起运重量：<text>60KG</text>
            </view>
            <view class="pintuan_item4_cent">
              开团时间：<text>5天</text>
            </view>
            <view class="pintuan_item4_cent">
              收件地址：<text>新加坡淡马锡大道9号新达城大楼433232新加坡淡马锡大道9号新达城大楼433232</text>
            </view>
            <view class="pintuan_item4_bottom">
              <view class="pintuan_item4_b1">还差<text>2</text>人拼成</view>
              <view class="pintuan_item4_btns">拼团中</view>
            </view>

          </view>
          <view class="pintuan_item4_cont">
            <view class="pintuan_item4_top">
              <view class="pintuan_item4_l">
                <image src="../../pages/images/dzx_img27.png"></image>
                <text>新加坡拼团</text>
              </view>
              <view class="pintuan_item4_r">
                <image src="../../pages/images/dzx_img76.png"></image>
                <text>距您442m</text>
              </view>
            </view>
            <view class="pintuan_item4_cent" style="margin-top:24rpx;">
              拼团人数：<text>3人团</text>
            </view>
            <view class="pintuan_item4_cent">
              起运重量：<text>60KG</text>
            </view>
            <view class="pintuan_item4_cent">
              开团时间：<text>5天</text>
            </view>
            <view class="pintuan_item4_cent">
              收件地址：<text>新加坡淡马锡大道9号新达城大楼433232新加坡淡马锡大道9号新达城大楼433232</text>
            </view>
            <view class="pintuan_item4_bottom">
              <view class="pintuan_item4_b1">还差<text>2</text>人拼成</view>
              <view class="pintuan_item4_btns">拼团中</view>
            </view>

          </view>
          <view class="pintuan_item4_cont">
            <view class="pintuan_item4_top">
              <view class="pintuan_item4_l">
                <image src="../../pages/images/dzx_img27.png"></image>
                <text>新加坡拼团</text>
              </view>
              <view class="pintuan_item4_r">
                <image src="../../pages/images/dzx_img76.png"></image>
                <text>距您442m</text>
              </view>
            </view>
            <view class="pintuan_item4_cent" style="margin-top:24rpx;">
              拼团人数：<text>3人团</text>
            </view>
            <view class="pintuan_item4_cent">
              起运重量：<text>60KG</text>
            </view>
            <view class="pintuan_item4_cent">
              开团时间：<text>5天</text>
            </view>
            <view class="pintuan_item4_cent">
              收件地址：<text>新加坡淡马锡大道9号新达城大楼433232新加坡淡马锡大道9号新达城大楼433232</text>
            </view>
            <view class="pintuan_item4_bottom">
              <view class="pintuan_item4_btns">拼团中</view>
            </view>

          </view>

        </view>
      </view>
      <view class="pintuan_item5">暂时没有更多数据了哦~</view> -->
                </view>
            </view>
            <view class="index_tankuangs" v-if="tankuangisshows">
                <view class="index_tankuangs_tan">
                    <view class="index_tankuangs_list">
                        <view class="index_tankuangs_cont" @tap="tiaozhuan" data-url="/pages/indexs/baoguoyg/baoguoyg">
                            <image src="http://daigou.sllowly.cn/assets/api/images/dzx_img60.png"></image>
                            <view class="index_tankuangs_cont_txt">
                                <view class="index_tankuangs_cont_t1">包裹预报</view>
                                <view class="index_tankuangs_cont_t2">包裹预报</view>
                            </view>
                        </view>
                        <view class="index_tankuangs_cont" @tap="jump_chaxun">
                            <image src="http://daigou.sllowly.cn/assets/api/images/dzx_img61.png"></image>
                            <view class="index_tankuangs_cont_txt">
                                <view class="index_tankuangs_cont_t1">轨迹查询</view>
                                <view class="index_tankuangs_cont_t2">轨迹查询</view>
                            </view>
                        </view>
                        <view class="index_tankuangs_cont" @tap="tiaozhuan" data-url="/pages/indexs/yunfeigusuan/yunfeigusuan">
                            <image src="http://daigou.sllowly.cn/assets/api/images/dzx_img62.png"></image>
                            <view class="index_tankuangs_cont_txt">
                                <view class="index_tankuangs_cont_t1">运费估算</view>
                                <view class="index_tankuangs_cont_t2">运费估算</view>
                            </view>
                        </view>
                        <view class="index_tankuangs_cont" @tap="tiaozhuan" data-url="/pages/indexs/shenqingdb/shenqingdb">
                            <image src="http://daigou.sllowly.cn/assets/api/images/dzx_img63.png"></image>
                            <view class="index_tankuangs_cont_txt">
                                <view class="index_tankuangs_cont_t1">申请打包</view>
                                <view class="index_tankuangs_cont_t2">申请打包</view>
                            </view>
                        </view>
                    </view>
                    <view class="index_tankuangs_cha" @tap="tankuangguanbi">
                        <image src="http://daigou.sllowly.cn/assets/api/images/dzx_img64.png"></image>
                    </view>
                </view>
            </view>
        
		</view>
        <!-- parse <template is="menu" :data="...item"></template> -->
        <block name="menu">
            <view class="menu_content">
                <view class="menu_content_list">
                    <view class="menu_content_dis">
                        <view class="menu_content_cont" @tap="jump_indexs">
                            <view class="menu_content_img">
                                <image :src="'http://daigou.sllowly.cn/assets/api/images/' + (indexId == 0 ? 'dzx_imgs11.png' : 'dzx_imgs1.png')"></image>
                            </view>
                            <view :style="'color:' + (indexId == 0 ? '#393939' : '#666')" class="menu_content_txt">首页</view>
                        </view>
                        <view class="menu_content_cont" @tap="jump_chaxun">
                            <view class="menu_content_img">
                                <image :src="'http://daigou.sllowly.cn/assets/api/images/' + (indexId == 1 ? 'dzx_imgs22.png' : 'dzx_imgs2.png')"></image>
                            </view>
                            <view :style="'color:' + (indexId == 1 ? '#393939' : '#666')" class="menu_content_txt">查询</view>
                        </view>
                    </view>

                    <view class="menu_content_cont2" @tap="tankuang">
                        <view class="menu_content_img2">
                            <image :src="'http://daigou.sllowly.cn/assets/api/images/' + (indexId == 2 ? 'dzx_imgs5.png' : 'dzx_imgs5.png')"></image>
                        </view>
                    </view>

                    <view class="menu_content_dis2">
                       <!-- <view class="menu_content_cont" @tap="jump_pintuan">
                            <view class="menu_content_img">
                                <image :src="'http://daigou.sllowly.cn/assets/api/images/' + (indexId == 3 ? 'dzx_imgs33.png' : 'dzx_imgs3.png')"></image>
                            </view>
                            <view :style="'color:' + (indexId == 3 ? '#393939' : '#666')" class="menu_content_txt">拼团</view>
                        </view> -->
						<view class="menu_content_cont" @tap="jump_pintuan">
						    <view class="menu_content_img">
						        <image :src="'http://daigou.sllowly.cn/assets/api/images/' + (indexId == 3 ? 'dzx_imgs33.png' : 'dzx_imgs3.png')"></image>
						    </view>
						    <view :style="'color:' + (indexId == 3 ? '#393939' : '#666')" class="menu_content_txt">商城</view>
						</view>
                        <view class="menu_content_cont" @tap="jump_personal">
                            <view class="menu_content_img">
                                <image :src="'http://daigou.sllowly.cn/assets/api/images/' + (indexId == 4 ? 'dzx_imgs44.png' : 'dzx_imgs4.png')"></image>
                            </view>
                            <view :style="'color:' + (indexId == 4 ? '#393939' : '#666')" class="menu_content_txt">我的</view>
                        </view>
                    </view>
                </view>
            </view>
        </block>
    
	</view>
</template>

<script>
// pages/shouye/shouye_zkc/shouye_zkc.js
const app = getApp();
export default {
    data() {
        return {
            navH: 0,
            gaodu: app.globalData.height,
            gaodutops: app.globalData.top,
			indexId: 3,
            item: {
                indexId: 3,
                colors: '#fff;',
                isfujin: '',
                isshop: ''
            },
            //轮播图
            circular: true,
            //是否显示画板指示点
            indicatorDots: false,
            //选中点的颜色
            colors: '#5D59EC',
            //未选中点的颜色
            color: '#fff',
            //是否竖直
            vertical: false,
            //是否自动切换
            autoplay: true,
            //自动切换的间隔
            interval: 3000,
            //滑动动画时长毫秒
            duration: 1000,
            //默认
            current: 0,
            banertrue: false,
            tankuangisshows: false
        };
    }, //滑动显示顶部
    onPageScroll: function (e) {
        if (e.scrollTop > this.navH + 50) {
            this.setData({
                banertrue: true
            });
        } else {
            this.setData({
                banertrue: false
            });
        }
    },
    /**
     * 生命周期函数--监听页面加载
     */
    onLoad() {
        var that = this;
        that.setData({
            navH: app.globalData.navHeight // 给刚刚声明的变量附上全局获取的nav高度
        });
    },
    onShow() {
        var that = this;
    },
    /**
     * 生命周期函数--监听页面初次渲染完成
     */
    onReady: function () {},
    /**
     * 生命周期函数--监听页面隐藏
     */
    onHide: function () {},
    /**
     * 生命周期函数--监听页面卸载
     */
    onUnload: function () {},
    /**
     * 页面相关事件处理函数--监听用户下拉动作
     */
    onPullDownRefresh: function () {},
    /**
     * 页面上拉触底事件的处理函数
     */
    onReachBottom: function () {},
    /**
     * 用户点击右上角分享
     */
    onShareAppMessage: function () {},
    methods: {
        tiaozhuan(e) {
            uni.navigateTo({
                url: e.currentTarget.dataset.url
            });
        },

        qutianjia() {
            uni.navigateTo({
                url: '/pages/pintuans/faqipintuan/faqipintuan'
            });
        },

        gotiaozhuan(e) {
            uni.navigateTo({
                url: e.currentTarget.dataset.url
            });
        },

        tankuangguanbi() {
            this.setData({
                tankuangisshows: false
            });
        },

        tankuang() {
            this.setData({
                tankuangisshows: true
            });
        },

        jump_indexs(e) {
            console.log('sssssss');
            uni.reLaunch({
                url: '../index/index'
            });
        },

        jump_chaxun(e) {
            uni.reLaunch({
                url: '/pages/chaxun/chaxun'
            });
        },

        jump_pintuan(e) {
            uni.reLaunch({
                url: '/pages/pintuan/pintuan'
            });
        },

        jump_personal(e) {
            uni.reLaunch({
                url: '/pages/my/my'
            });
        },

        jumpzuo() {
            uni.navigateBack()
        }
    }
};
</script>
<style>
@import './pintuan.css';
</style>
